<template>
  <van-cell  @click="$router.push(`/article/${obj.art_id}`)" >
 <!-- <h3 slot="title">Dockerfile最佳实践</h3>
 <p slot="title"><span>置顶</span> <span>miketech.it</span> <span>87评论</span> <span>1小时前</span></p>
 <van-image src="https://img01.yzcdn.cn/vant/cat.jpeg"  ></van-image> -->
 <div slot="title" class="aaa"> {{obj.title}}</div>
   <div slot="label">
      <div class="cover-wrap" v-if="obj.cover.type === 3">
        <div
          class="cover-item"
          v-for="(img,i) in obj.cover.images" :key="i"  
        >
          <van-image 
            :src="img"
          />
        </div>
      </div>
      <div>
        <span>{{obj.aut_name}}</span>
        <span>{{ obj.comm_count }}评论 </span>
        <span>{{ obj.pubdate | relativeTime }}</span>
      </div>
    </div>
    <div class="box" v-if="obj.cover.type === 1">
      <van-image 
            :src="obj.cover.images[0]"
          />
    </div>
  </van-cell>
</template>

<script>

import {getArticles } from '@/api/article'
export default {
 name : 'cheshi',
 data () {
  return {
  }
 },
 props : {
  obj : {
    typeof: Object,
    required : true
  }
 },
 created () {
   console.log(this.obj,'====');
 }
}
</script>

<style lang="less" scoped>
 /deep/ .van-image__img {
 width: 232px;
	height: 146px;
 }
 .aaa {
  font-size: 32px;
 }
 span {
    font-size: 22px;
    color: #b4b4b4;
    margin-right: 25px;
 }
 /deep/ .van-cell__title {
  flex: 2;
 }
 /deep/ .cover-wrap {
  display: flex;
 }
</style>